﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPgAdmin.master" AutoEventWireup="true" CodeFile="EditProvince.aspx.cs" Inherits="Admin_EditProvince" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Header1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <div style="background-image:url('../Images/body-bg.png');direction:rtl;padding-bottom:20px;padding-top:10px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">
        <div style="padding-right:350px; width:100%">
      
                         <asp:Image ID="Image2" runat="server"  src="../Images/CodeExpert.png" 
                    Width="30%" />
        </div>
         <div style="width:90%;margin:auto; background-image:url('../Images/content-bg.png');padding-right:8px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">
          <br />
    <table style="width: 100%" >
        <tr>
            <td align="center" colspan="4">
                <asp:SqlDataSource ID="SqlProvince" runat="server" 
                ConnectionString="<%$ ConnectionStrings:CON %>"
                    ProviderName="System.Data.SqlClient" 
                    SelectCommand="SELECT [ProvinceName], [ID], [Code] FROM [TblProvince]">
                </asp:SqlDataSource>
                
            </td>
        </tr>
        <tr>
            <td style="height: 17px; width: 90px;">
                </td>
            <td align="right" style="height: 17px">
                &nbsp;</td>
            <td style="height: 17px">
                &nbsp;</td>
            <td style="height: 17px">
                </td>
        </tr>
        <tr>
            <td style="width: 90px">
                &nbsp;</td>
            <td align="right">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 90px">
                <asp:Label ID="Label1" runat="server" ForeColor="#000099" Text="کد شهرستان"></asp:Label>
            </td>
            <td align="right">
                <asp:TextBox ID="Txcode" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 90px">
                <asp:Label ID="Label3" runat="server" ForeColor="#000099" Text="نام شهرستان"></asp:Label>
            </td>
            <td align="right">
                <asp:TextBox ID="Txpro" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 90px">
                &nbsp;</td>
            <td align="right">
                <asp:Button ID="BtnEdit" runat="server" onclick="BtnEdit_Click" 
                    Text="ثبت ویرایش" CssClass="Button" />
                <asp:Label ID="LblSuccess" runat="server" BackColor="#0066FF" 
                    BorderColor="Yellow" ForeColor="Yellow"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="4" >
                <div style="border: 1px solid #DEDEDE;border-radius:3px;box-shadow: 0px 0px 10px rgba(189, 189, 189, 0.4);padding :10px;width:440px;margin:auto;">
                <div  class="headerTable" >
                <div style="width:10%;float:right">
                    <asp:Image ID="Image1" runat="server" src="../Images/ava_default_1.jpg" Height="40px" />
                </div>
                <div style="width:50%;float:right">
                    <h3><asp:Label ID="Label10" runat="server" Text="کد شهرستانهای ثبت شده"></asp:Label></h3>
                </div>
                
                
                </div>
                <div   >   


                <asp:GridView ID="GrdProvince" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
                    BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="ID" 
                    DataSourceID="SqlProvince" Width="100%" 
                    onrowcommand="GrdProvince_RowCommand" Font-Bold="False" GridLines="None" ForeColor="#333333" >
                        <AlternatingRowStyle BackColor="White"   />
                    <Columns>
                      <asp:BoundField DataField="ID" InsertVisible="False" 
                            ReadOnly="True" SortExpression="ID" NullDisplayText="*" >
                        <ControlStyle ForeColor="#CCCCCC" />
                        <ItemStyle ForeColor="#CCCCCC" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ProvinceName" HeaderText="نام شهرستان" 
                            SortExpression="ProvinceName"  ReadOnly="true"/>
                      
                        <asp:BoundField DataField="Code" HeaderText="کد شهرستان" 
                            SortExpression="Code"  ReadOnly="true"/>
                        <asp:ButtonField CommandName="Edit" HeaderText="ویرایش" Text="ویرایش"  ImageUrl="~/ImageIcon/Edit-icon.png"/>
                        
                    </Columns>
                   <Columns>
                    <asp:TemplateField Visible="false">
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text ='<% #Bind("ID") %>'></asp:Label>

                    </ItemTemplate>
                     </asp:TemplateField>
                     </Columns>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
                </div>
            </td>
        </tr>
    </table>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Header" Runat="Server">
</asp:Content>

